package org.girllee.boot.hystrix.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("x")
public class HController {

    @RequestMapping("y")
    public Object getO(){
        Map<String, Object> map = new HashMap<>();
        map.put("asdf", "iiiei");
        map.put("iiei", 2222);
        return map;
    }

    @GetMapping("x")
    public Object getObje() throws Exception {
        throw new Exception("No body.");
    }

    @GetMapping("m")
    public Object getObj(){
        throw new RuntimeException("No body.");
    }
}
